package com.cskaoyan.bean.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @program: project2_market
 * @time: 2021/10/19
 * @author: yangshuai
 **/

@NoArgsConstructor
@Data
public class StatOrderVo {


    private List<String> columns;
    private List<Rows> rows;

    public StatOrderVo(List<String> columns, List<Rows> rows) {
        this.columns = columns;
        this.rows = rows;
    }

    @NoArgsConstructor
    @Data
    public static class Rows {
        private Double amount;
        private Integer orders;
        private Integer customers;
        @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
        private Date day;
        private Double pcr;

        public Rows(Double amount, Integer orders, Integer customers, Date day, Double pcr) {
            this.amount = amount;
            this.orders = orders;
            this.customers = customers;
            this.day = day;
            this.pcr = pcr;
        }


    }
}
